x86: Although bzimage_headroom() doesn't return -ve values,
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 29 Jan 2009 11:28:09 +0000 (11:28 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 29 Jan 2009 11:28:09 +0000 (11:28 +0000)
bzimage_parse() can.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/bzimage.c

index f432c9e1151ee9154517a29951c469de7d01f68b..37bc78eec27bd278ea6c153887517ec29d6e1983 100644 (file)
@@ -185,7 +185,7 @@ static __init int bzimage_check(struct setup_header *hdr, unsigned long len)
     if ( hdr->version < VERSION(2,8) ) {
         printk("Cannot load bzImage v%d.%02d at least v2.08 is required\n",
            hdr->version >> 8, hdr->version & 0xff);
-        return 0;
+        return -EINVAL;
     }
     return 1;
 }
@@ -198,7 +198,7 @@ int __init bzimage_headroom(char *image_start, unsigned long image_length)
 
     err = bzimage_check(hdr, image_length);
     if (err < 1)
-        return err;
+        return 0;
 
     img = image_start + (hdr->setup_sects+1) * 512;
     img += hdr->payload_offset;